package com.toncen.samepms.fisher.condition;

import com.sky.fisher.condition.AbstractCondition;
import com.sky.fisher.condition.ConditionEnum;
import com.sky.fisher.model.CommonColumnModel;

public class InformationEqulasCondition extends AbstractCondition{
	
	public InformationEqulasCondition() {
		super(ConditionEnum.STRING_EQULAS);
	}

	@Override
	public String getConditionSQL(CommonColumnModel column, String value) throws Exception {
		StringBuffer conditionSQL = new StringBuffer();
		conditionSQL.append(" and " + column.getField() + " in " + //
				"(" + //
				" select information_id from net_channel, net_chanel_information	" + //
				" where net_channel.state = 1 	" + //
				" and net_channel.name = '" + value + "' " + //
				" and net_channel.id = net_chanel_information.chanel_id	" + //
				" ) ");
		return conditionSQL.toString();
	}

}